home *** CD-ROM | disk | FTP | other *** search
- Path: gate.net!pslfl2-10
- From: bhutto@gate.net (William Hutto)
- Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
- Subject: Re: C or C++ for a 14-year old?
- Date: 8 Jan 1996 07:42:59 GMT
- Organization: CyberGate, Inc.
- Message-ID: <4cqhu3$1quo@news.gate.net>
- References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <w31V7MD4ED1aLz3@dexam.another.gun.de> <dschrage.23.152EBB70@indirect.com> <4cq6cr$t51@dub-news-svc-1.compuserve.com>
- NNTP-Posting-Host: pslfl2-10.gate.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <4cq6cr$t51@dub-news-svc-1.compuserve.com>,
- JamesCurran@CIS.CompuServe.Com (James M. Curran) wrote:
- >dschrage@indirect.com (Dan Schrage) wrote:
- >
- >>Moreover, C is the
- >>most practical language that one can learn, because it can do basically
- >>anything, even system-level programming using a variety of toolkits (until
- >>you get into hard-core assembler programming, which is where I am at now).
- >
- > My choice would be C++, for two simple reasons: With a porper string
- >classs, you eliminate the need for C's rather insane "string as an
- >array of really tiny integers" model, the #1 cause of trouble among
- >beginning C programmer. In fact, with a standard class library that's
- >in any way competnet, you can virtually do with any pointers in your
- >code (the #2 cause of trouble). And with new/delete with those rare
- >cases where you insist on having a pointer, you avoid the troble of
- >malloc/free (#3 cause of trouble...)
- >
-
- What am I doing in this thread???
-
- I would recommend either BASIC or batch programming. Not for long
- though. The first ideology of programming is setting down a list of
- instructions for the system to carry out. When it comes to sequential flow,
- BASIC or batch processing would be the easiest to learn in my opinion; and
- with that learning comes the confidence of achievement, considering the
- student has generated something useful. They could then go on to learn
- conditional expressions and loops, and even subprograms.
- I think that BASIC has gotten too far away from it's original purpose
- (and we all know what the acronym means). As a curriculum, I would expect it
- to be very short in duration (no longer than a semester). *I* initially
- learned with a BASIC interpreter. The beauty of the interpreter is the
- interaction between student and computer. Very little understanding or
- knowledge is required to start programming. I really rather think the
- experience is even 'fun.'
-
- 10 FOR I=1 TO 10
- 20 PRINT "YOUR NAME HERE"
- 30 NEXT I
- 40 END
-
- RUN
-
- This *program* is very concise in implementation. I've taught a seven
- year old this same type of construct with little effort.
-
- int main(void) {
- int i;
-
- for(i=1; i<=10; i++)
- puts("YOUR NAME HERE");
- return 0;
- }
-
- This *program* requires considerably more explanation. Also, if this
- is not a C *interpreter* the student needs to know something about compilation
- and may even need to know about files and linking.
-
- The ultimate *destination* might be a commonly used/accepted language.
- I went from BASIC to 6502 assembly language, 8086 assembly language, C, C++
- and then Pascal. When I got to Pascal I thought, "Oops, wrong way!"
- I almost wanted to say, start with assembler. Coming from assembler, I
- really understand what's happening with C (pointers took me about 5 minutes to
- understand). That is, I'm much more understanding of the efficiency of the C
- language. With C++, it's somehow vague as to just what the compiler is going
- to generate. I don't want to spend time learning the compiler's quirks. I'm
- much more *in tune* with the physical or *real* aspects of *the machine* and
- C++ is rather abstract. Although, on the other hand, C++ was a good lesson
- for me in abstraction and it's benefits, and is superb for modeling the *real*
- world as well as the GUI.
- I think the point I would want to make is that these are issues that
- concern those who are *experienced* in programming. "Don't bite off more than
- you can chew" is a good analogy.
-
- There's my $1.00/50
-
- Bill
-
- "Whatcha got on?...Your mind?"
-